//
//  Macro.h
//  RainbowFM
//
//  Created by jv on 14-12-6.
//  Copyright (c) 2014年 RB. All rights reserved.
//

#ifndef RainbowFM_Macro_h
#define RainbowFM_Macro_h


#define _Nav2Board(__T__) \
        UIStoryboard *board = [UIStoryboard storyboardWithName:__T__ bundle:nil];\
        UIViewController *ctrl = [board instantiateInitialViewController];\
        [self.navigationController pushViewController:ctrl animated:YES];\

#define _Nav2SelfViewControl(__storyBoardID__) \
        UIViewController *ctrl = [self.storyboard instantiateViewControllerWithIdentifier:__storyBoardID__];\
        [self.navigationController pushViewController:ctrl animated:YES];


#define _Nav2ViewControl(__boardName__,__storyBoardID__) \
    UIStoryboard *board = [UIStoryboard storyboardWithName:__boardName__ bundle:nil];\
    UIViewController *ctrl = [board instantiateViewControllerWithIdentifier:__storyBoardID__];\
    [self.navigationController pushViewController:ctrl animated:YES];\

#define _LoadXib(__N__,__O__,__D__) [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([__N__ class]) owner:__O__ options:__D__] lastObject];

#define _F(...) [NSString stringWithFormat:__VA_ARGS__]

#define _RMB(num) (_F(@"¥%.1f",[num intValue]/100.0))

#endif
